package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.ruoyi.system.domain.SysTrainingCategory;
import com.ruoyi.system.domain.param.SysTrainingCategoryParam;
import com.ruoyi.system.domain.param.SysTrainingVideosParam;
import com.ruoyi.system.domain.vo.SysTrainingCategoryVo;
import com.ruoyi.system.domain.vo.SysTrainingVideosVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysTrainingCategoryMapper extends BaseMapper<SysTrainingCategory> {
    /**
     * 分页查询商品分类
     *
     * @param param
     * @return
     */
    List<SysTrainingCategoryVo> selectSysTrainingCategoryPage(@Param("param") SysTrainingCategoryParam param);

    /**
     * 商品分类列表展示
     *
     * @return
     */
    List<SysTrainingCategoryVo> selectAllList(@Param("projectId")Long projectId);

    /**
     * 商品分类详情信息
     *
     * @param id
     * @return
     */
    SysTrainingCategoryVo selectInfo(@Param("id") Long id,@Param("projectId") Long projectId);

    /**
     * 根据项目id 查询分类集合
     * @param projectId
     * @return
     */
    List<SysTrainingCategoryVo> selectListTwo(@Param("projectId") Long projectId);

    IPage<SysTrainingVideosVo> selectVideos(@Param("page") Page<SysTrainingVideosVo> Page, @Param("param") SysTrainingVideosParam param);

    List<String> selectUrls(@Param("trainingCategoryId") Integer trainingCategoryId);

    List<String> selectFileName(@Param("trainingCategoryId") Integer trainingCategoryId);

    //int deleteBatchIdsWithStatus(@Param("idList") List<String> idList, @Param("projectId") Long projectId);

    Long isDeleteTraining(@Param("id")Long id,@Param("projectId")Long projectId);
    Long isDeleteTrainingParentId(@Param("id")Long id,@Param("projectId")Long projectId);

    SysTrainingCategory selectTrainingPolling(Long id);
    List<SysTrainingCategory> selectTrainingPollingParent(Long id);















}
